package org.etsi.ttcn.tci;

public interface UnionValue extends Value {

/**
 *  Returns the value of the TTCN-3 union variantName, in case variantName equals the result of
 *  getPresentVariantName, the distinct value null otherwise. variantName denotes the name of the
 *  union variant as defined in TTCN-3.
 */
    Value      getVariant  (String variantName);

/**
 *  Sets variantName of the union to value. In case variantName is not defined for this union this
 *  operation will be ignored. In case another variant was selected the new variant will be selected instead.
 */
    void       setVariant  (String variantName, Value value);

/**
 *  Returns the variant name that has a value in this union set as a String.
 *  The distinct value null will be returned if no variant is selected.
 */
    String     getPresentVariantName ();

/**
 *  Returns an array of String of variant names, the distinct value null, if the union has no fields.
 *  In case the UnionValue represents the TTCN-3 anytype, i.e. the type class of the type obtained by
 *  getType() is ANYTYPE, all predefined and user-defined TTCN-3 types will be returned.
 */
    String[]   getVariantNames ();

} // UnionValue
